package com.boot.core.define

/**
 * @author rankai on 2018/3/22.
 */
enum class MyTimeUnit(val t: Int) {
    YEAR(1), MONTH(2), DAY(3), HOUR(4);
    companion object {
        fun from(findValue: Int): MyTimeUnit = MyTimeUnit.values().first { it.t == findValue }
    }
}